Get Tool OpenAPI Schema
Used to retrieve the OpenAPI schema for a specific tool. This generates a standard OpenAPI specification document that describes all the tool's actions, parameters, and responses.
API Endpoint
| Property | Value |
|---|---|
| Request Method | GET |
| Request URL | https://api.seliseblocks.com/tools/{tool_id}/schema/openapi |
Request
Request Example
curl -X GET 'https://api.seliseblocks.com/tools/{tool_id}/schema/openapi?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| tool_id | string | Yes | The unique identifier of the tool. |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| project_key | string | No | The project key for your project. |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
note
OpenAPI Schema Generation
- The schema is generated dynamically based on current tool configuration
- Follows OpenAPI 3.0 specification standard
- Includes all active actions and their parameters
- Authentication details are included (credentials are excluded)
- The schema can be used with standard OpenAPI tools
tip
Use cases for OpenAPI schema:
- Generating client SDKs in various programming languages
- Importing into API testing tools like Postman or Insomnia
- Creating API documentation with tools like Swagger UI
- Validating API requests and responses
- Integrating with API gateway or management platforms
- Sharing API specifications with external developers
- Version control for API changes
The OpenAPI schema includes:
- Complete endpoint definitions for all actions
- Request parameter schemas with types and validation rules
- Response schemas with expected formats
- Authentication and security requirements
- Server information and base URLs
- Tags and categorization for actions
Response
Success Response (200 OK)
Returns the OpenAPI schema for the tool.
{
"tool_id": "tool_123",
"schema_type": "openapi",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "Customer API",
"description": "API for managing customer data and interactions",
"version": "1.2.0"
},
"servers": [
{
"url": "https://api.example.com/v1",
"description": "Production server"
}
],
"paths": {
"/customers/{id}": {
"get": {
"summary": "Get Customer",
"description": "Retrieve customer information by ID",
"operationId": "get_customer",
"tags": ["Customers"],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Customer ID"
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"customer_id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
]
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
}
},
"generated_at": "2026-01-12T07:46:20.316Z",
"actions_count": 15,
"project_key": "YOUR_PROJECT_KEY"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| tool_id | string | Unique identifier of the tool. |
| schema_type | string | Type of schema returned (always "openapi"). |
| schema | object | Complete OpenAPI specification document. |
| generated_at | string | ISO 8601 timestamp when the schema was generated. |
| actions_count | integer | Number of actions included in the schema. |
| project_key | string | The project key for the tool. |
OpenAPI Schema Structure
The schema object follows the OpenAPI 3.0 specification and includes:
| Section | Description |
|---|---|
| openapi | OpenAPI specification version (e.g., "3.0.0") |
| info | API metadata including title, description, and version |
| servers | Array of server URLs where the API is hosted |
| paths | All API endpoints with operations (GET, POST, etc.) |
| components | Reusable components including schemas and security schemes |
| tags | Tags for organizing and categorizing operations |
| security | Global security requirements |
Info Section Fields
| Field | Type | Description |
|---|---|---|
| title | string | Display name of the API. |
| description | string | Detailed description of the API. |
| version | string | Current version of the API. |
Server Section Fields
| Field | Type | Description |
|---|---|---|
| url | string | Base URL for the API server. |
| description | string | Description of the server (e.g., "Production", "Staging"). |
Path Operation Fields
Each operation in the paths section includes:
| Field | Type | Description |
|---|---|---|
| summary | string | Brief summary of what the operation does. |
| description | string | Detailed description of the operation. |
| operationId | string | Unique identifier for the operation. |
| tags | array | Tags for categorization. |
| parameters | array | Input parameters for the operation. |
| requestBody | object | Request body schema (for POST/PUT/PATCH). |
| responses | object | Expected responses with status codes. |
| security | array | Security requirements for this operation. |
Error Response (422 Unprocessable Entity)
Returns validation error details when the request parameters are invalid.
{
"detail": [
{
"loc": [
"path",
"tool_id"
],
"msg": "tool not found",
"type": "value_error.notfound"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., path, query). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 400 | Bad Request - Invalid request | Bad Request |
| 404 | Not Found - Tool does not exist | Not Found |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |